import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
import Login from '@/views/Login'
import CheckIn from '@/views/CheckIn/Index'
import CheckInCorporateInformation from '@/views/CheckIn/CorporateInformation'
import CheckInStatus from '@/views/CheckIn/CheckInStatus'
const drouter = [
  {
    path: "/",
    name: "layout",
    label: "外框",
    component: () => import(/* webpackChunkName: 'layout' */  "@/views/Layout"),
    children: [
      // Test,
    ],
  },
  {
    path: "/login",
    name: "Login",
    label: "登录",
    component: Login,
  },
  {
    path: "/check-in",
    name: "CheckIn",
    label: "入住",
    component: CheckIn,
    redirect: () => {
      return { path: "/check-in-corporate-information", query: { step: 0 } };
    },
    children: [
      {
        path: "/check-in-corporate-information",
        name: "CheckInCorporateInformation",
        label: "企业入住",
        component: CheckInCorporateInformation,
      },
      {
        path: "/check-in-status",
        name: "CheckInStatus",
        label: "审核状态",
        component: CheckInStatus,
      },
    ],
  },
];

export default new Router({
  // mode: "history", //后端支持可开
  scrollBehavior: () => ({
    y: 0,
  }),
  routes: drouter,
});
